package cc.shacocloud.luanniao.core.model.dto.input

import cc.shacocloud.luanniao.core.model.constant.KnowledgeBaseTypeEnum
import jakarta.validation.constraints.Min
import jakarta.validation.constraints.NotBlank
import jakarta.validation.constraints.NotNull
import org.hibernate.validator.constraints.Length

/**
 *
 * @field:author 思追(shaco)
 */
data class KnowledgeBaseInput(

    /**
     * 名称
     */
    @field:NotBlank
    @field:Length(min = 1, max = 120)
    val name: String,

    /**
     * 头像链接地址
     */
    val avatar: String? = null,

    /**
     * 知识库描述
     */
    @field:Length(min = 0, max = 1000)
    val description: String? = null,

    /**
     * 父目录id
     */
    val parentId: Long? = null,

    /**
     * 关联 ai 模型id，在类型不等于 [KnowledgeBaseTypeEnum.DIRECTORY] 时不可以为空
     */
    @field:NotNull
    @field:Min(0)
    val aiModelId: Long,
)
